package DataBean;

public class Basic {

    private String[] name;
    private String mobile = null;
    private String birth = null;
    private String group = null;
    private String note = null;
    private String photographs = null;
    private String mailbox = null;

    public Basic() {
        name = new String[2];
    }

    public Basic(String name[], String mobile, String birth, String group, String note, String photographs, String mailbox) {
        this.name = name;
        this.mobile = mobile;
        this.birth = birth;
        this.group = group;
        this.note = note;
        this.photographs = photographs;
        this.mailbox = mailbox;
    }

    @Override
    public String toString() {
        return "Basic{" + "name=" + getName() + ", mobile=" + getMobile() + ", birth=" + getBirth() + ", group=" + getGroup() + ", note=" + getNote() + ", photographs=" + getPhotographs() + ", mailbox=" + getMailbox() + '}';
    }

    /**
     * @return the name
     */
    public String getName() {
        return name[0] + name[1];
    }

    public String getName(int n) {
        return name[n];
    }

    /**
     * @param name the name to set
     */
    public void setName(String name[]) {
        this.name = name;
    }

    /**
     * @return the mobile
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * @param mobile the mobile to set
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * @return the birth
     */
    public String getBirth() {
        return birth;
    }

    /**
     * @param birth the birth to set
     */
    public void setBirth(String birth) {
        this.birth = birth;
    }

    /**
     * @return the group
     */
    public String getGroup() {
        return group;
    }

    /**
     * @param group the group to set
     */
    public void setGroup(String group) {
        this.group = group;
    }

    /**
     * @return the note
     */
    public String getNote() {
        return note;
    }

    /**
     * @param note the note to set
     */
    public void setNote(String note) {
        this.note = note;
    }

    /**
     * @return the photographs
     */
    public String getPhotographs() {
        return photographs;
    }

    /**
     * @param photographs the photographs to set
     */
    public void setPhotographs(String photographs) {
        if (this.photographs == null) {
            this.photographs = photographs;
        } else {
            this.photographs = this.photographs + photographs;
        }
    }

    /**
     * @return the mailbox
     */
    public String getMailbox() {
        return mailbox;
    }

    /**
     * @param mailbox the mailbox to set
     */
    public void setMailbox(String mailbox) {
        this.mailbox = mailbox;
    }

}
